home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWString / Sources / SLTxtRun.cpp < prev   
Encoding:
C/C++ Source or Header  |  1996-04-25  |  6.2 KB  |  223 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  *  This file was generated by the SOM Compiler.
  4.  *  Generated using: 
  5.  *      SOM Emitter emitxtm.dll: 2.33
  6.  */
  7.  
  8. #include "FWFound.hpp"
  9.  
  10. #ifndef FWSTDDEF_H
  11. #include "FWStdDef.h"
  12. #endif
  13.  
  14. #ifndef SOM_Module_ODFStringSubsystem_defined
  15. #include "FWTxtTyp.xh"
  16. #endif
  17.  
  18. #ifndef FWODEXCE_H
  19. #include "FWODExce.h"
  20. #endif
  21.  
  22. #define FW_OTextRunReader_Class_Source
  23. #define FW_OTextRunWriter_Class_Source
  24. #define FW_OMemoryRunReader_Class_Source
  25. #define FW_OMemoryRunWriter_Class_Source
  26. #include "SLTxtRun.xih"
  27.  
  28. #ifdef FW_BUILD_WIN
  29. #define corbastring string
  30. #endif
  31.  
  32. //========================================================================================
  33. // FW_OTextRunReader
  34. //========================================================================================
  35.  
  36. SOM_Scope corbastring  SOMLINK FW_OTextRunReader__GetCurrentRun(FW_OTextRunReader *somSelf, Environment *ev,
  37.         FW_ByteCount* length,
  38.         FW_Locale* locale)
  39. {
  40. FW_UNUSED(somSelf);
  41. FW_UNUSED(ev);
  42. FW_UNUSED(locale);
  43. FW_UNUSED(length);
  44.     FW_PRIV_ASSERT(Subclass_Responsibility);
  45.     return 0;
  46. }
  47.  
  48. SOM_Scope boolean  SOMLINK FW_OTextRunReader__NextRun(FW_OTextRunReader *somSelf, Environment *ev)
  49. {
  50. FW_UNUSED(somSelf);
  51. FW_UNUSED(ev);
  52.     FW_PRIV_ASSERT(Subclass_Responsibility);
  53.     return false;
  54. }
  55.  
  56. SOM_Scope boolean  SOMLINK FW_OTextRunReader__PreviousRun(FW_OTextRunReader *somSelf, Environment *ev)
  57. {
  58. FW_UNUSED(somSelf);
  59. FW_UNUSED(ev);
  60.     FW_PRIV_ASSERT(Subclass_Responsibility);
  61.     return false;
  62. }
  63.  
  64. SOM_Scope FW_ByteCount  SOMLINK FW_OTextRunReader__GetTotalLength(FW_OTextRunReader *somSelf, Environment *ev)
  65. {
  66. FW_UNUSED(somSelf);
  67. FW_UNUSED(ev);
  68.     FW_PRIV_ASSERT(Subclass_Responsibility);
  69.     return 0;
  70. }
  71.  
  72. //========================================================================================
  73. // FW_OTextRunWriter
  74. //========================================================================================
  75.  
  76. SOM_Scope corbastring  SOMLINK FW_OTextRunWriter__GetCurrentRun(FW_OTextRunWriter *somSelf, Environment *ev,
  77.         FW_ByteCount* length)
  78. {
  79. FW_UNUSED(somSelf);
  80. FW_UNUSED(ev);
  81. FW_UNUSED(length);
  82.     FW_PRIV_ASSERT(Subclass_Responsibility);
  83.     return 0;
  84. }
  85.  
  86. SOM_Scope void  SOMLINK FW_OTextRunWriter__FlushRun(FW_OTextRunWriter *somSelf, Environment *ev,
  87.         corbastring buffer,
  88.         FW_ByteCount bytesToFlush)
  89. {
  90. FW_UNUSED(somSelf);
  91. FW_UNUSED(ev);
  92. FW_UNUSED(buffer);
  93. FW_UNUSED(bytesToFlush);
  94.     FW_PRIV_ASSERT(Subclass_Responsibility);
  95. }
  96.  
  97. SOM_Scope boolean  SOMLINK FW_OTextRunWriter__NewRun(FW_OTextRunWriter *somSelf, Environment *ev,
  98.         FW_Locale* locale)
  99. {
  100. FW_UNUSED(somSelf);
  101. FW_UNUSED(ev);
  102. FW_UNUSED(locale);
  103.     FW_PRIV_ASSERT(Subclass_Responsibility);
  104.     return false;
  105. }
  106.  
  107. //========================================================================================
  108. // FW_OMemoryRunReader
  109. //========================================================================================
  110.  
  111. SOM_Scope FW_OMemoryRunReader*  SOMLINK FW_OMemoryRunReader__Initialize(FW_OMemoryRunReader *somSelf, Environment *ev,
  112.         corbastring buffer,
  113.         FW_ByteCount length)
  114. {
  115. FW_UNUSED(ev);
  116.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);    
  117.     somThis->fBuffer = buffer;
  118.     somThis->fLength = length;
  119.     return somSelf;
  120. }
  121.  
  122. SOM_Scope void  SOMLINK FW_OMemoryRunReader__somInit(FW_OMemoryRunReader *somSelf)
  123. {
  124.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  125.     FW_OMemoryRunReader_parent_FW_OTextRunReader_somInit(somSelf);
  126.     somThis->fBuffer = 0;
  127.     somThis->fLength = 0;
  128. }
  129.  
  130. SOM_Scope void  SOMLINK FW_OMemoryRunReader__somUninit(FW_OMemoryRunReader *somSelf)
  131. {
  132.     FW_OMemoryRunReader_parent_FW_OTextRunReader_somUninit(somSelf);
  133. }
  134.  
  135. SOM_Scope corbastring  SOMLINK FW_OMemoryRunReader__GetCurrentRun(FW_OMemoryRunReader *somSelf, Environment *ev,
  136.         FW_ByteCount* length,
  137.         FW_Locale* locale)
  138. {
  139. FW_UNUSED(ev);
  140. FW_UNUSED(locale);
  141.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  142.     *length = somThis->fLength;
  143.     return somThis->fBuffer;
  144. }
  145.  
  146. SOM_Scope boolean  SOMLINK FW_OMemoryRunReader__NextRun(FW_OMemoryRunReader *somSelf, Environment *ev)
  147. {
  148. FW_UNUSED(ev);
  149. FW_UNUSED(somSelf);
  150.     return false;
  151. }
  152.  
  153. SOM_Scope boolean  SOMLINK FW_OMemoryRunReader__PreviousRun(FW_OMemoryRunReader *somSelf, Environment *ev)
  154. {
  155. FW_UNUSED(ev);
  156. FW_UNUSED(somSelf);
  157.     return false;
  158. }
  159.  
  160. SOM_Scope FW_ByteCount  SOMLINK FW_OMemoryRunReader__GetTotalLength(FW_OMemoryRunReader *somSelf, Environment *ev)
  161. {
  162. FW_UNUSED(ev);
  163.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  164.     return somThis->fLength;
  165. }
  166.  
  167. //========================================================================================
  168. // FW_OMemoryRunWriter
  169. //========================================================================================
  170.  
  171. SOM_Scope FW_OMemoryRunWriter*  SOMLINK FW_OMemoryRunWriter__Initialize(FW_OMemoryRunWriter *somSelf, Environment *ev,
  172.         corbastring buffer,
  173.         FW_ByteCount capacity)
  174. {
  175. FW_UNUSED(ev);
  176.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  177.     somThis->fBuffer = buffer;
  178.     somThis->fCapacity = capacity;
  179.     return somSelf;
  180. }
  181.  
  182. SOM_Scope void  SOMLINK FW_OMemoryRunWriter__somInit(FW_OMemoryRunWriter *somSelf)
  183. {
  184.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  185.     FW_OMemoryRunWriter_parent_FW_OTextRunWriter_somInit(somSelf);
  186.     somThis->fBuffer = 0;
  187.     somThis->fCapacity = 0;
  188. }
  189.  
  190. SOM_Scope void  SOMLINK FW_OMemoryRunWriter__somUninit(FW_OMemoryRunWriter *somSelf)
  191. {
  192.     FW_OMemoryRunWriter_parent_FW_OTextRunWriter_somUninit(somSelf);
  193. }
  194.  
  195. SOM_Scope corbastring  SOMLINK FW_OMemoryRunWriter__GetCurrentRun(FW_OMemoryRunWriter *somSelf, Environment *ev,
  196.         FW_ByteCount* length)
  197. {
  198. FW_UNUSED(ev);
  199.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  200.     *length = somThis->fCapacity;
  201.     return somThis->fBuffer;
  202. }
  203.  
  204. SOM_Scope void  SOMLINK FW_OMemoryRunWriter__FlushRun(FW_OMemoryRunWriter *somSelf, Environment *ev,
  205.         corbastring buffer,
  206.         FW_ByteCount bytesToFlush)
  207. {
  208. FW_UNUSED(ev);
  209.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  210.     FW_PRIV_ASSERT(somThis->fBuffer <= buffer);
  211.     FW_PRIV_ASSERT(buffer+bytesToFlush <= somThis->fBuffer+somThis->fCapacity);
  212.     // Nothing to do
  213. }
  214.  
  215. SOM_Scope boolean  SOMLINK FW_OMemoryRunWriter__NewRun(FW_OMemoryRunWriter *somSelf, Environment *ev,
  216.         FW_Locale* locale)
  217. {
  218. FW_UNUSED(ev);
  219. FW_UNUSED(somSelf);
  220. FW_UNUSED(locale);
  221.     return false;
  222. }
  223.